/*
 * @Author: Crism
 * @Date: 2018-08-09 14:01:57
 * @LastEditors: Crism
 * @LastEditTime: 2018-08-09 14:01:57
 * @Description: 
 * @Email: crism@qq.com
 */



const pkg = require('./package.json');

const config = {
    debug: false,
    host: '127.0.0.1',
    port: 3008,
    name: 'cwc_server',
    version: pkg.version,
}

const fs = require('fs');
const errorLogfile = fs.createWriteStream(__dirname + '/logs/error.log', { flags: 'a', encoding: null, mode: 0777 });

const db_config = require('./db_config');
const DB = require('./libs/DB');
const db_wyw = new DB(db_config.wyw_config);

// const redis_config = require('./redis_config');
// const RedisClient = require('./libs/RedisClient');
// const redis_blockchain = new RedisClient(redis_config.redis_blockchain_config);
// const redis_session = new RedisClient(redis_config.redis_session_config);
// const redis_user = new RedisClient(redis_config.redis_user_config);

// const secretKeyHost = '10.104.156.90:3007';

module.exports.config = config;
module.exports.errorLogfile = errorLogfile;
module.exports.db_wyw = db_wyw;

// module.exports.redis_blockchain = redis_blockchain;
// module.exports.redis_session = redis_session
// module.exports.redis_user = redis_user;
// module.exports.secretKeyHost = secretKeyHost;
